package com.jrsoft.bim.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * ${DESCRIPTION}
 *
 * @author Blueeyedboy
 * @create 2019-12-20 5:31 PM
 **/
public class DateUtil {

	public static Date getDate(){
		return new Date(System.currentTimeMillis());
	}

	public static long getTimeMillis(){
		return System.currentTimeMillis();
	}

	/**
	 * 获取当前日期时间字符串2017-12-12 12:12:12
	 * @param
	 * @return
	 * @author Blueeyedboy
	 * @create 2017/5/23 14:26
	 **/
	public static String getDateTimeStr(Date currentTime){
		if(currentTime == null){
			//currentTime = getDate();
			return null;
		}
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String dateString = formatter.format(currentTime);
		return dateString;
	}
}
